package com.gjzhao.fmmall.constant;

/**
 * @Description: 常量信息
 * @Author: gjzhao
 * @Date Created in 2022-01-09 6:42 下午
 */
public class Constants {

    /**
     * 订单状态 1:待付款 2:待发货 3:待收货 4:待评价 5:已完成 6:已关闭
     */
    public static enum OrderStats {

        NOT_PAYMENT("1", "待付款"),
        NOT_DELIVERED("2", "待发货"),
        NOT_RECEIPT("3", "待收货"),
        NOT_COMMENT("4", "待评价"),
        COMPLETED("5", "已完成"),
        CLOSED("6", "已关闭");

        private final String value;
        private final String name;

        private OrderStats(String value, String name) {
            this.value = value;
            this.name = name;
        }


        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 评论状态： 0 未评价  1 已评价
     */
    public static enum CommentStatus {

        NOT_COMMENT(1, "未评价"),
        COMPLETED(2, "已评价");

        private final Integer value;
        private final String name;

        private CommentStatus(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 微信支付状态 - SUCCESS：支付成功 - REFUND：转入退款 - NOTPAY：未支付 - CLOSED：已关闭 - REVOKED：已撤销（仅付款码支付会返回） - USERPAYING：用户支付中（仅付款码支付会返回） - PAYERROR：支付失败（仅付款码支付会返回）
     */
    public static enum PayStatus {

        SUCCESS("SUCCESS", "支付成功"),
        REFUND("REFUND", "转入退款"),
        NOTPAY("NOTPAY", "未支付"),
        CLOSED("CLOSED", "已关闭"),
        REVOKED("REVOKED", "已撤销"),
        USERPAYING("USERPAYING", "用户支付中"),
        PAYERROR("PAYERROR", "支付失败");

        private final String value;
        private final String name;

        private PayStatus(String value, String name) {
            this.value = value;
            this.name = name;
        }


        public String getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 订单关闭类型：1-超时未支付 2-退款关闭 4-买家取消 5-已通过货到付款交易
     */
    public static enum OrderCloseStatus {

        TIMEOUT_NOTPAY(1, "超时未支付"),
        REFUND_CLOSED(2, "退款关闭"),
        BUYER_CANCEL(3, "买家取消"),
        PAYMENT_TRADE(4, "已通过货到付款交易");

        private final Integer value;
        private final String name;

        private OrderCloseStatus(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 删除状态： 0 未删除  1 删除
     */
    public static enum DeleteStatus {

        UNDO_DELETE(0, "未删除"),
        DELETED(1, "删除");

        private final Integer value;
        private final String name;

        private DeleteStatus(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }

    /**
     * 商品评价类型： 1好评，0中评，-1差评
     */
    public static enum CommentType {

        GOOD_COMMENT(1, "好评"),
        MIDDLE_COMMENT(0, "中评"),
        BAD_COMMENT(-1, "差评");

        private final Integer value;
        private final String name;

        private CommentType(Integer value, String name) {
            this.value = value;
            this.name = name;
        }


        public Integer getValue() {
            return value;
        }

        public String getName() {
            return name;
        }

    }
}
